package ogloszenia.test;

import javax.faces.component.UIComponent;
import javax.faces.event.FacesEvent;
import javax.faces.event.FacesListener;

import org.richfaces.event.FileUploadListener;

//import org.richfaces.model.UploadedFile;

/**
 * @author Konstantin Mishin
 * 
 */
public class FileUploadEvent extends FacesEvent {

    private static final long serialVersionUID = -7645197191376210068L;
    private UploadedFile uploadedFile = null;

    public FileUploadEvent(UIComponent component, UploadedFile uploadedFile) {
        super(component);
        this.uploadedFile = uploadedFile;
    }

    public boolean isAppropriateListener(FacesListener listener) {
        return listener instanceof FileUploadListener;
    }

    public void processListener(FacesListener listener) {
        //((FileUploadListener) listener).processFileUpload(this);
    }

    public UploadedFile getUploadedFile() {
        return uploadedFile;
    }
}